Register Pressure Sensitive Redundancy Elimination

نویسندگان

  • Rajiv Gupta
  • Rastislav Bodík
چکیده

Redundancy elimination optimizations avoid repeated computation of the same value by computing the value once, saving it in a temporary, and reusing the value from the temporary when it is needed again. Examples of redundancy elimination optimizations include common subexpression elimination, loop invariant code motion and partial redundancy elimination. We demonstrate that the introduction of tem-poraries to save computed values can result in a signiicant increase in register pressure. An increase in register pressure may in turn trigger generation of spill code which can more than ooset the gains derived from redundancy elimination. While current techniques minimize increases in register pressure, to avoid spill code generation it is instead necessary to ensure that register pressure does not exceed the number of available registers. In this paper we develop a redundancy elimination algorithm that is sensitive to register pressure: our novel technique rst sets upper limits on allowed register pressure and then performs redundancy elimination within these limits. By setting strict register pressure limits for frequently executed (hot) blocks and higher limits for infrequently executed (cold) blocks, our algorithm permits trade-oo between redundancy removal from hot blocks at the expense of introducing spill code in cold blocks. In addition, the program proole is also used to prioritize opti-mizable expressions; when not enough registers are available, the most prootable redundancies are removed rst. To increase redundancy elimination within the allowed register pressure, our algorithm lowers the pressure with two new program transformation techniques: (a) whenever possible, we avoid inserting a temporary and instead access the reused value from existing variables, which reduces the life time of the temporary beyond existing live-range optimal algorithms; and (b) the live ranges of variables referenced by the expressions are shortened by combining expression hoisting with assignment sinking.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Code-Size Sensitive Partial Redundancy Elimination

Program optimization focuses usually on improving the runtime efficiency of a program. Its impact on the code size is typically not considered a concern. In fact, classical optimizations often cause code replication without providing any means allowing a user to control this. This limits their adequacy for applications, where code size is critical, too, like embedded systems or smart cards. In ...

متن کامل

Register Promotion by Sparse Partial Redundancy Elimination

An algorithm for register promotion is presented based on the observation that the circumstances for promoting a memory location's value to register coincide with situations where the program exhibits partial redundancy between accesses to the memory location. The recent SSAPRE algorithm for eliminating partial redundancy using a sparse SSA representation forms the foundation for the present al...

متن کامل

Optimal Code Motion in the Presence of Large Expressions

Oliver R uthing Department of Computer Science University of Dortmund D-44221 Dortmund, Germany [email protected] Abstract Common algorithms for partial redundancy elimination that are sensitive to register pressure are designed from a single-expression point of view. For each computation under investigation unnecessary code motion is avoided as far as possible. Unfortunately, su...

متن کامل

Program Memory Redundancy Analysis and Elimination to Improve Application Performance

As a consequence of current evolution trend of both software development paradigm and processor architecture, memory operations have become not only more frequent during program execution, but also more expensive in terms of hardware resource usage. A useful phenomenon which can be exploited to optimize memory operations is memory redundancy: loads and stores that have the same effects as previ...

متن کامل

Integrating Program Optimizations and Transformations with the Scheduling of Instruction Level Parallelism

Code optimizations and restructuring transformations are typically applied before scheduling to improve the quality of generated code. However, in some cases, the optimizations and transformations do not lead to a better schedule or may even adversely affect the schedule. In particular, optimizations for redundancy elimination and restructuring transformations for increasing parallelism axe oft...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999